import request from '@/utils/request'

// 查询图纸集Line列表
export function listDrawingline(query) {
  return request({
    url: '/md/drawingline/list',
    method: 'get',
    params: query
  })
}

// 查询图纸集Line详细
export function getDrawingline(id) {
  return request({
    url: '/md/drawingline/' + id,
    method: 'get'
  })
}

// 新增图纸集Line
export function addDrawingline(data) {
  return request({
    url: '/md/drawingline',
    method: 'post',
    data: data
  })
}

// 修改图纸集Line
export function updateDrawingline(data) {
  return request({
    url: '/md/drawingline',
    method: 'put',
    data: data
  })
}

// 删除图纸集Line
export function delDrawingline(id) {
  return request({
    url: '/md/drawingline/' + id,
    method: 'delete'
  })
}

// 查询图纸集Line列表
export function listProcessDrawingline(query) {
  return request({
    url: '/md/drawingline/processlist',
    method: 'get',
    params: query
  })
}

// 根据图纸版本查询工图纸列表（条件）
export function getByDrawCode(query) {
  return request({
    url: '/md/drawingline/getByDrawCode',
    method: 'get',
    params: query
  })
}

export function getDrawByItemId(query) {
  return request({
    url: '/md/drawingline/getDrawByItemId',
    method: 'get',
    params: query
  })
}
